# This rakefile is for building the EC2 on Rails gem.
# To build a server AMI, see server/rakefile.rb

begin
  require 'jeweler'
  Jeweler::Tasks.new do |gemspec|
    gemspec.name = "ec2onrails-experimental"
    gemspec.summary = "Client-side libraries (Capistrano tasks) for managing and deploying to EC2 on Rails servers."
    gemspec.description = <<-DESC.strip.gsub(/\n\s+/, " ")
      Deploy a Ruby on Rails app on EC2 in five minutes. 
      EC2 on Rails is an Ubuntu Linux server image for Amazon EC2 that’s ready to run a standard
      Ruby on Rails application with little or no customization. 
      It’s a Ruby on Rails virtual appliance.
      This gem contains Capistrano tasks to manage and deploy to an EC2 on Rails server instance.
    DESC
    if gemspec.name == "ec2onrails-experimental"
      experimental_warning = " *** This is the experimental, pre-release version.*** For the regular version install the gem 'ec2onrails'"
      gemspec.summary += experimental_warning
      gemspec.description += experimental_warning
    end
    gemspec.homepage = "http://ec2onrails.rubyforge.org"

    gemspec.authors = ['Paul Dowman', 'Adam Greene']
    gemspec.email = "paul@pauldowman.com"

    gemspec.files.exclude 'server/**/*'
    gemspec.files.exclude 'test/**/*'

    gemspec.add_dependency('capistrano', '>= 2.5.3')
    gemspec.add_dependency('archive-tar-minitar', '>= 0.5.2')
    gemspec.add_dependency('optiflag', '>= 0.6.5')
    
    gemspec.rubyforge_project = gemspec.name
    Jeweler::RubyforgeTasks.new do |rubyforge|
      rubyforge.doc_task = "rdoc"
    end
  end
  Jeweler::GemcutterTasks.new
rescue LoadError
  puts "Jeweler not available. Install it with: sudo gem install jeweler"
end
